package com.sh.ssao.lottery.config.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 *
 */
@Component
@Slf4j
public class JsonFormatUtil {

    String[] roles = null;
    JSONArray ja = new JSONArray();

    public JSONArray jsonFormtExuct(JSONArray ja){
        this.ja = ja;
        for (Object jb : ja) {
            JSONObject jo = JSON.parseObject(String.valueOf(jb));
            log.debug(jo.getString("id")+"\n:"+jo.getString("title")+"\n:"+jo.getString("children")+"\n:");

        }
        return ja;
    }
}
